home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2010 April / PCWorld0410.iso / pluginy Firefox / 5579 / 5579.xpi / chrome / content / common.xslt < prev    next >
Extensible Markup Language  |  2010-01-06  |  41KB  |  1,050 lines

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <xsl:transform version="1.0"
  3.                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  4.                xmlns:atom="http://www.w3.org/2005/Atom"
  5.                xmlns:gd="http://schemas.google.com/g/2005"
  6.                xmlns:gphoto="http://schemas.google.com/photos/2007"
  7.                xmlns:media="http://search.yahoo.com/mrss/"
  8.                xmlns:mediabroken="http://search.yahoo.com/mrss"
  9.                xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
  10.                xmlns:html="http://www.w3.org/1999/xhtml"
  11.                xmlns:ci="http://schemas.cooliris.com/layout/2008">
  12.  
  13.  
  14.   <!-- INPUT PARAMETERS -->
  15.  
  16.   <xsl:param name="ci:com.cooliris.favorite"/>
  17.   <xsl:param name="ci:com.cooliris.gfx.background"/>
  18.   <xsl:param name="ci:com.cooliris.nav-bar.icon"/>
  19.   <xsl:param name="ci:com.cooliris.nav-bar.text"/>
  20.  
  21.   <xsl:param name="ci:sys.client-revision"/>
  22.   <xsl:param name="ci:sys.client-browser"/>
  23.   <xsl:param name="ci:sys.toolbars-visible"/>
  24.   <xsl:param name="ci:sys.flash-version"/>
  25.   <xsl:param name="ci:sys.upper-toolbar-height"/>
  26.   <xsl:param name="ci:sys.wall-lower-toolbar-height"/>
  27.   <xsl:param name="ci:sys.fullscreen-lower-toolbar-height"/>
  28.  
  29.  
  30.   <!-- RESOURCE URLS -->
  31.  
  32.   <xsl:param name="video-badge-uri">resource:images/badge.play.png</xsl:param>
  33.   <xsl:param name="flash-badge-uri">resource:images/badge.play.png</xsl:param>
  34.   <xsl:param name="album-badge-uri">resource:images/badge.album.png</xsl:param>
  35.  
  36.  
  37.   <!-- STRINGS -->
  38.  
  39.   <xsl:include href="resource:strings-$(sys.locale).xslt"/>
  40.  
  41.  
  42.   <!-- COMMON STYLES -->
  43.  
  44.   <xsl:param name="standard-selected-content-style">
  45.     min-height: 400px;
  46.     -ci-image-resize: scale-both;
  47.     -ci-load-mode: async;
  48.     -ci-z-order: 1;
  49.   </xsl:param>
  50.  
  51.   <xsl:param name="standard-link-style">
  52.     white-space: nowrap;
  53.     color: <xsl:value-of select="$link-color"/>;
  54.     -ci-color-hover: <xsl:value-of select="$link-color-hover"/>;
  55.     -ci-color-clicked: <xsl:value-of select="$link-color-clicked"/>;
  56.     -ci-text-truncate-mode: ellipsis;
  57.     -ci-text-box-expand: true;
  58.     -ci-text-decoration-hover: underline;
  59.     -ci-text-decoration-clicked: underline;
  60.   </xsl:param>
  61.  
  62.   <xsl:param name="underlined-link-style">
  63.     <xsl:value-of select="$standard-link-style"/>
  64.     text-decoration: underline;
  65.   </xsl:param>
  66.  
  67.   <xsl:param name="shaded-background">
  68.     color: #fff;
  69.     -ci-background-gradient-color-1: #000;
  70.     -ci-background-gradient-color-2: #222;
  71.     -ci-background-gradient-opacity-1: 0.7;
  72.     -ci-background-gradient-opacity-2: 0.9;
  73.   </xsl:param>
  74.  
  75.  
  76.   <!-- DATA EXTRACTION TEMPLATES -->
  77.  
  78.   <xsl:template name="content-type">
  79.     <xsl:choose>
  80.       <xsl:when test="media:content/@type='video/x-flv' or
  81.                       mediabroken:content/@type='video/x-flv' or
  82.                       media:content/@type='video/flv' or
  83.                       mediabroken:content/@type='video/flv'">VIDEO</xsl:when>
  84.       <xsl:when test="media:content/@type='application/x-shockwave-flash' or
  85.                       mediabroken:content/@type='application/x-shockwave-flash'">FLASH</xsl:when>
  86.       <xsl:otherwise>OTHER</xsl:otherwise>
  87.     </xsl:choose>
  88.   </xsl:template>
  89.  
  90.  
  91.   <xsl:template name="get-link-uri">
  92.     <xsl:choose>
  93.       <xsl:when test="atom:link[@rel='alternate' and @type='text/html']"><xsl:value-of select="atom:link[@rel='alternate' and @type='text/html']/@href"/></xsl:when>
  94.       <xsl:when test="link[@rel='alternate' and @type='text/html']"><xsl:value-of select="link[@rel='alternate' and @type='text/html']/@href"/></xsl:when>
  95.       <xsl:when test="atom:link[@rel='alternate']"><xsl:value-of select="atom:link[@rel='alternate']/@href"/></xsl:when>
  96.       <xsl:when test="link[@rel='alternate']"><xsl:value-of select="link[@rel='alternate']/@href"/></xsl:when>
  97.       <xsl:otherwise><xsl:value-of select="link/text()"/></xsl:otherwise>
  98.     </xsl:choose>
  99.   </xsl:template>
  100.  
  101.  
  102.   <xsl:template name="get-title">
  103.     <xsl:apply-templates select="title/text()" mode="sanitize"/>
  104.   </xsl:template>
  105.  
  106.  
  107.   <xsl:template name="get-description">
  108.     <xsl:choose>
  109.       <xsl:when test="description[not(contains(text(), '<img')) and not(contains(text(), '<a ')) and not(contains(text(), '<p>'))]">
  110.         <xsl:apply-templates select="description/text() | description/*" mode="sanitize"/>
  111.       </xsl:when>
  112.       <xsl:when test="media:description[not(@type='html')]">
  113.         <xsl:apply-templates select="media:description/text() | media:description/*" mode="sanitize"/>
  114.       </xsl:when>
  115.     </xsl:choose>
  116.   </xsl:template>
  117.  
  118.  
  119.   <!-- CALL-BY-NAME TEMPLATES -->
  120.  
  121.   <xsl:template name="message-box">
  122.     <xsl:param name="title"/>
  123.     <xsl:param name="description"/>
  124.  
  125.     <xul:stack style="-ci-auto-size: message-box-body;">
  126.       <xul:image id="message-box-background" src="resource:images/status-panel-gray.png" style="-ci-9-grid: 25 40 38 40;"/>
  127.       <xul:vbox id="message-box-body" style="margin: 40px;">
  128.         <xul:description id="message-box-body-inner" style="-ci-text-box-expand: true;">
  129.           <html:p>
  130.             <xsl:attribute name="style">
  131.               font-size: 16pt;
  132.               line-height: 100%;
  133.               color: <xsl:value-of select="$highlight-foreground-color"/>;
  134.               -ci-paragraph-spacing: 12pt;
  135.             </xsl:attribute>
  136.             <html:span><xsl:copy-of select="$title"/></html:span>
  137.           </html:p>
  138.           <html:p>
  139.             <xsl:attribute name="style">
  140.               font-size: 12pt;
  141.               color: <xsl:value-of select="$foreground-color"/>;
  142.             </xsl:attribute>
  143.             <html:span><xsl:copy-of select="$description"/></html:span>
  144.           </html:p>
  145.         </xul:description>
  146.         <xul:box height="6pt"/>
  147.       </xul:vbox>
  148.     </xul:stack>
  149.   </xsl:template>
  150.  
  151.  
  152.   <xsl:template name="share-button">
  153.     <ci:button id="kButtonMetadataStartMessage" alt="{$string-tooltip-share-button}" animate-mouse-out="{$animate-buttons}"
  154.                src="{$button-share-src}" hover-src="{$button-share-hover-src}"
  155.                pressed-src="{$button-share-pressed-src}" clicked-src="{$button-share-clicked-src}"
  156.                style="max-height: 32px">
  157.       <ci:call-method scope="item" name="share-item"/>
  158.     </ci:button>
  159.   </xsl:template>
  160.  
  161.  
  162.   <xsl:template name="favorite-button">
  163.     <xsl:choose>
  164.       <xsl:when test="$ci:com.cooliris.favorite = 'true'">
  165.         <ci:button id="kButtonMetadataStar" alt="{$string-tooltip-favorite-on-button}" animate-mouse-out="{$animate-buttons}"
  166.                    src="{$button-favorite-on-src}" hover-src="{$button-favorite-on-hover-src}"
  167.                    pressed-src="{$button-favorite-on-pressed-src}" clicked-src="{$button-favorite-on-clicked-src}"
  168.                    style="max-height: 32px">
  169.           <ci:set-property scope="item" name="com.cooliris.favorite"/>
  170.         </ci:button>
  171.       </xsl:when>
  172.       <xsl:otherwise>
  173.         <ci:button id="kButtonMetadataStar" alt="{$string-tooltip-favorite-off-button}" animate-mouse-out="{$animate-buttons}"
  174.                    src="{$button-favorite-off-src}" hover-src="{$button-favorite-off-hover-src}"
  175.                    pressed-src="{$button-favorite-off-pressed-src}" clicked-src="{$button-favorite-off-clicked-src}"
  176.                    style="max-height: 32px">
  177.           <ci:set-property scope="item" name="com.cooliris.favorite" value="true"/>
  178.         </ci:button>
  179.       </xsl:otherwise>
  180.     </xsl:choose>
  181.   </xsl:template>
  182.  
  183.  
  184.   <xsl:template name="goto-uri-button">
  185.     <xsl:param name="link-uri">
  186.       <xsl:call-template name="get-link-uri"/>
  187.     </xsl:param>
  188.  
  189.     <xsl:if test="$link-uri != ''">
  190.       <ci:button id="kButtonMetadataAttribution" alt="{$string-tooltip-goto-uri-button}" animate-mouse-out="{$animate-buttons}"
  191.                  src="{$button-goto-uri-src}" hover-src="{$button-goto-uri-hover-src}"
  192.                  pressed-src="{$button-goto-uri-pressed-src}" clicked-src="{$button-goto-uri-clicked-src}"
  193.                  style="max-height: 32px"
  194.                  href="{$link-uri}"/>
  195.     </xsl:if>
  196.   </xsl:template>
  197.  
  198.  
  199.   <xsl:template name="goto-folder-button">
  200.     <xsl:param name="link-uri">
  201.       <xsl:call-template name="get-link-uri"/>
  202.     </xsl:param>
  203.  
  204.     <xsl:if test="$link-uri != ''">
  205.       <ci:button id="kButtonMetadataAttribution" alt="{$string-tooltip-goto-uri-button-local}" animate-mouse-out="{$animate-buttons}"
  206.                  src="{$button-goto-uri-src}" hover-src="{$button-goto-uri-hover-src}"
  207.                  pressed-src="{$button-goto-uri-pressed-src}" clicked-src="{$button-goto-uri-clicked-src}"
  208.                  style="max-height: 32px"
  209.                  href="{$link-uri}"/>
  210.     </xsl:if>
  211.   </xsl:template>
  212.  
  213.  
  214.   <xsl:template name="light-share-button">
  215.     <ci:button id="kButtonMetadataStartMessage" alt="{$string-tooltip-share-button}" animate-mouse-out="false"
  216.                src="{$light-button-share-src}" hover-src="{$light-button-share-hover-src}"
  217.                pressed-src="{$light-button-share-pressed-src}" clicked-src="{$light-button-share-clicked-src}"
  218.                style="max-height: 32px">
  219.       <ci:call-method scope="item" name="share-item"/>
  220.     </ci:button>
  221.   </xsl:template>
  222.  
  223.  
  224.   <xsl:template name="light-favorite-button">
  225.     <xsl:choose>
  226.       <xsl:when test="$ci:com.cooliris.favorite = 'true'">
  227.         <ci:button id="kButtonMetadataStar" alt="{$string-tooltip-favorite-on-button}" animate-mouse-out="false"
  228.                    src="{$light-button-favorite-on-src}" hover-src="{$light-button-favorite-on-hover-src}"
  229.                    pressed-src="{$light-button-favorite-on-pressed-src}" clicked-src="{$light-button-favorite-on-clicked-src}"
  230.                    style="max-height: 32px">
  231.           <ci:set-property scope="item" name="com.cooliris.favorite"/>
  232.         </ci:button>
  233.       </xsl:when>
  234.       <xsl:otherwise>
  235.         <ci:button id="kButtonMetadataStar" alt="{$string-tooltip-favorite-off-button}" animate-mouse-out="false"
  236.                    src="{$light-button-favorite-off-src}" hover-src="{$light-button-favorite-off-hover-src}"
  237.                    pressed-src="{$light-button-favorite-off-pressed-src}" clicked-src="{$light-button-favorite-off-clicked-src}"
  238.                    style="max-height: 32px">
  239.           <ci:set-property scope="item" name="com.cooliris.favorite" value="true"/>
  240.         </ci:button>
  241.       </xsl:otherwise>
  242.     </xsl:choose>
  243.   </xsl:template>
  244.  
  245.  
  246.   <xsl:template name="light-goto-uri-button">
  247.     <xsl:param name="link-uri">
  248.       <xsl:call-template name="get-link-uri"/>
  249.     </xsl:param>
  250.  
  251.     <xsl:if test="$link-uri != ''">
  252.       <ci:button id="kButtonMetadataAttribution" alt="{$string-tooltip-goto-uri-button}" animate-mouse-out="false"
  253.                  src="{$light-button-goto-uri-src}" hover-src="{$light-button-goto-uri-hover-src}"
  254.                  pressed-src="{$light-button-goto-uri-pressed-src}" clicked-src="{$light-button-goto-uri-clicked-src}"
  255.                  style="max-height: 32px"
  256.                  href="{$link-uri}"/>
  257.     </xsl:if>
  258.   </xsl:template>
  259.  
  260.  
  261.   <xsl:template name="thumbnail-content-box">
  262.     <xsl:param name="custom-badge"/>
  263.     <xsl:param name="use-custom-badge-fragment"/>
  264.     <xsl:param name="suppress-content-type-badge"/>
  265.  
  266.     <xsl:variable name="content-type">
  267.       <xsl:call-template name="content-type"/>
  268.     </xsl:variable>
  269.  
  270.     <xul:hbox id="content-box" flex="1" pack="-ci-no-padding" style="min-width: 150px; -ci-priority: notrim; -ci-pack-overflow: center">
  271.       <xul:stack id="content-stack" flex="1">
  272.         <xsl:attribute name="style">
  273.           -ci-z-order: 1;
  274.           -ci-auto-size: content!placeholder;
  275.         </xsl:attribute>
  276.  
  277.         <xsl:choose>
  278.           <xsl:when test="media:thumbnail or mediabroken:thumbnail">
  279.             <xsl:apply-templates select="media:thumbnail[position() = 1] | mediabroken:thumbnail[position() = 1]"/>
  280.           </xsl:when>
  281.           <xsl:when test="media:content or mediabroken:content">
  282.             <xsl:apply-templates select="media:content | mediabroken:content" mode="thumbnail"/>>
  283.           </xsl:when>
  284.         </xsl:choose>
  285.  
  286.         <xul:vbox style="align: start; pack: end">
  287.           <xsl:choose>
  288.             <xsl:when test="string-length($custom-badge)">
  289.               <xul:image id="badge" style="opacity: 0.8; max-width: 48px; -ci-image-resize: scale-both;">
  290.                 <xsl:attribute name="src"><xsl:value-of select="$custom-badge"/></xsl:attribute>
  291.               </xul:image>
  292.             </xsl:when>
  293.  
  294.             <xsl:when test="$use-custom-badge-fragment = 'true'">
  295.               <xsl:copy-of select="$custom-badge"/>
  296.             </xsl:when>
  297.  
  298.             <xsl:when test="$content-type != 'OTHER' and $suppress-content-type-badge != 'true'">
  299.               <xul:image id="badge" style="opacity: 0.8; max-width: 48px; -ci-image-resize: scale-both;">
  300.                 <xsl:attribute name="src">
  301.                   <xsl:choose>
  302.                     <xsl:when test="$content-type = 'VIDEO'">
  303.                       <xsl:value-of select="$video-badge-uri"/>
  304.                     </xsl:when>
  305.                     <xsl:when test="$content-type = 'FLASH'">
  306.                       <xsl:value-of select="$flash-badge-uri"/>
  307.                     </xsl:when>
  308.                   </xsl:choose>
  309.                 </xsl:attribute>
  310.               </xul:image>
  311.             </xsl:when>
  312.           </xsl:choose>
  313.         </xul:vbox>
  314.       </xul:stack>
  315.     </xul:hbox>
  316.   </xsl:template>
  317.  
  318.  
  319.   <xsl:template name="standard-metadata-panel">
  320.     <xsl:variable name="timestamp">
  321.       <xsl:value-of select="pubdate/text()"/>
  322.     </xsl:variable>
  323.  
  324.     <xsl:variable name="title">
  325.       <xsl:call-template name="get-title"/>
  326.     </xsl:variable>
  327.  
  328.     <xsl:variable name="description">
  329.       <xsl:call-template name="get-description"/>
  330.     </xsl:variable>
  331.  
  332.     <xul:stack>
  333.       <xul:vbox align="end">
  334.         <xul:hbox id="button-box" style="-ci-occlusion-group-id: right-side-metadata">
  335.           <xul:box width="{$large-separator}"/>
  336.           <xsl:call-template name="share-button"/>
  337.           <xsl:call-template name="favorite-button"/>
  338.           <xsl:call-template name="goto-uri-button"/>
  339.         </xul:hbox>
  340.         <xsl:if test="atom:source[atom:logo]">
  341.           <xul:box flex="1"/>
  342.           <xul:hbox id="logo-box" style="-ci-occlusion-group-id: right-side-metadata">
  343.             <xul:box width="{$large-separator}"/>
  344.             <xsl:apply-templates select="atom:source[atom:logo]"/>
  345.           </xul:hbox>
  346.         </xsl:if>
  347.       </xul:vbox>
  348.  
  349.       <xul:vbox>
  350.         <xsl:if test="$title">
  351.           <xsl:if test="string-length($description) = 0">
  352.             <xul:box height="{$small-separator}"/>
  353.           </xsl:if>
  354.  
  355.           <xul:description id="title">
  356.             <xsl:attribute name="style">
  357.               <xsl:choose>
  358.                 <xsl:when test="@ci:state = 'selected'">
  359.                   font-size: 13pt;
  360.                   max-height: 4em;
  361.                   min-width: 200px;
  362.                 </xsl:when>
  363.                 <xsl:otherwise>
  364.                   font-size: 16pt;
  365.                   max-height: 10em;
  366.                 </xsl:otherwise>
  367.               </xsl:choose>
  368.               color: <xsl:value-of select="$highlight-foreground-color"/>;
  369.               font-weight: bold;
  370.               line-height: 110%;
  371.               -ci-text-box-expand: true;
  372.               -ci-text-truncate-mode: ellipsis;
  373.               -ci-occlusion-group-idref: right-side-metadata;
  374.             </xsl:attribute>
  375.  
  376.             <xsl:copy-of select="$title"/>
  377.           </xul:description>
  378.         </xsl:if>
  379.  
  380.         <xsl:if test="$description">
  381.           <xul:box height="{$tiny-separator}"/>
  382.           <xul:description id="description">
  383.             <xsl:attribute name="style">
  384.               <xsl:choose>
  385.                 <xsl:when test="@ci:state = 'selected'">
  386.                   max-height: 10em;
  387.                   min-width: 300px;
  388.                   -ci-text-box-expand: true;
  389.                 </xsl:when>
  390.                 <xsl:otherwise>
  391.                   max-height: 20em;
  392.                 </xsl:otherwise>
  393.               </xsl:choose>
  394.               line-height: 120%;
  395.               text-align: justify;
  396.               -ci-text-truncate-mode: ellipsis;
  397.               -ci-occlusion-group-idref: right-side-metadata;
  398.             </xsl:attribute>
  399.  
  400.             <xsl:copy-of select="$description"/>
  401.           </xul:description>
  402.         </xsl:if>
  403.       </xul:vbox>
  404.     </xul:stack>
  405.   </xsl:template>
  406.  
  407.  
  408.   <!-- CALL-BY-MATCH TEMPLATES FOR COMMON ELEMENTS -->
  409.  
  410.   <xsl:template match="media:thumbnail | mediabroken:thumbnail">
  411.     <xsl:param name="additional-styles"/>
  412.  
  413.     <ci:embed id="content!placeholder" flex="1">
  414.       <xsl:attribute name="style">
  415.         -ci-image-resize: scale-both;
  416.         -ci-z-order: 1;
  417.         <xsl:value-of select="$additional-styles"/>
  418.       </xsl:attribute>
  419.  
  420.       <xsl:if test="@url">
  421.         <xsl:attribute name="src">
  422.           <xsl:value-of select="@url"/>
  423.         </xsl:attribute>
  424.       </xsl:if>
  425.  
  426.       <xsl:copy-of select="@ci:referer"/>
  427.  
  428.       <xsl:if test="@type">
  429.         <xsl:attribute name="type">
  430.           <xsl:value-of select="@type"/>
  431.         </xsl:attribute>
  432.       </xsl:if>
  433.     </ci:embed>
  434.   </xsl:template>
  435.  
  436.  
  437.   <xsl:template match="media:content | mediabroken:content" mode="thumbnail">
  438.     <xsl:param name="additional-styles"/>
  439.  
  440.     <ci:embed id="content!placeholder" flex="1">
  441.       <xsl:attribute name="style">
  442.         -ci-image-resize: scale-both;
  443.         -ci-z-order: 1;
  444.         <xsl:value-of select="$additional-styles"/>
  445.       </xsl:attribute>
  446.  
  447.       <xsl:if test="@url">
  448.         <xsl:attribute name="src">
  449.           <xsl:value-of select="@url"/>
  450.         </xsl:attribute>
  451.       </xsl:if>
  452.  
  453.       <xsl:copy-of select="@ci:referer"/>
  454.  
  455.       <xsl:if test="@type">
  456.         <xsl:attribute name="type">
  457.           <xsl:value-of select="@type"/>
  458.         </xsl:attribute>
  459.       </xsl:if>
  460.     </ci:embed>
  461.   </xsl:template>
  462.  
  463.  
  464.   <xsl:template match="media:content | mediabroken:content">
  465.     <xsl:param name="id"/>
  466.     <xsl:param name="selected-content-style" select="$standard-selected-content-style"/>
  467.     <xsl:param name="scale-factor" select="1.0"/>
  468.  
  469.     <xsl:choose>
  470.       <xsl:when test="(string-length($ci:sys.flash-version) and $ci:sys.flash-version != 'unsupported')
  471.                       or not(@type = 'application/x-shockwave-flash')">
  472.         <ci:embed flex="1">
  473.           <xsl:attribute name="id">
  474.             <xsl:value-of select="$id"/>
  475.           </xsl:attribute>
  476.  
  477.           <xsl:attribute name="style">
  478.             <xsl:value-of select="$selected-content-style"/>
  479.             <xsl:if test="@width">
  480.               -ci-image-width: <xsl:value-of select="number(@width) * number($scale-factor)"/>;
  481.             </xsl:if>
  482.             <xsl:if test="@height">
  483.               -ci-image-height: <xsl:value-of select="number(@height) * number($scale-factor)"/>;
  484.             </xsl:if>
  485.           </xsl:attribute>
  486.  
  487.           <xsl:if test="@url">
  488.             <xsl:attribute name="src">
  489.               <xsl:value-of select="@url"/>
  490.             </xsl:attribute>
  491.           </xsl:if>
  492.  
  493.           <xsl:copy-of select="@ci:referer"/>
  494.  
  495.           <xsl:if test="@type">
  496.             <xsl:attribute name="type">
  497.               <xsl:value-of select="@type"/>
  498.             </xsl:attribute>
  499.           </xsl:if>
  500.         </ci:embed>
  501.       </xsl:when>
  502.  
  503.       <xsl:otherwise>
  504.         <xul:stack flex="1">
  505.           <xul:hbox id="thumbnail-container" pack="middle" align="middle">
  506.             <xsl:apply-templates select="../media:thumbnail | ../mediabroken:thumbnail"/>
  507.           </xul:hbox>
  508.  
  509.           <xul:hbox id="no-flash-message-container" pack="middle" align="middle"
  510.                     style="background-color: {$background-color}; opacity: 0.6; -ci-z-order: 2">
  511.             <xul:description id="no-flash-message">
  512.               <xsl:attribute name="style">
  513.                 font-family: Arial; font-size: 15pt; color: <xsl:value-of select="$highlight-foreground-color"/>;
  514.                 background-color: <xsl:value-of select="$highlight-background-color"/>;
  515.                 padding: 16pt; border-color: <xsl:value-of select="$bright-foreground-color"/>;
  516.               </xsl:attribute>
  517.               <xsl:choose>
  518.                 <xsl:when test="$ci:sys.flash-version = 'unsupported'">
  519.                   <xsl:value-of select="$string-flash-unsupported-message"/>
  520.                 </xsl:when>
  521.                 <xsl:otherwise>
  522.                   <xsl:value-of select="$string-no-flash-message"/>
  523.                 </xsl:otherwise>
  524.               </xsl:choose>
  525.             </xul:description>
  526.           </xul:hbox>
  527.         </xul:stack>
  528.       </xsl:otherwise>
  529.     </xsl:choose>
  530.   </xsl:template>
  531.  
  532.  
  533.   <xsl:template match="media:group | mediabroken:group">
  534.     <xsl:param name="selected-content-style" select="$standard-selected-content-style"/>
  535.     <xsl:param name="scale-factor" select="1.0"/>
  536.  
  537.     <ci:embedGroup id="content!placeholder" flex="1">
  538.       <xsl:attribute name="style">
  539.         <xsl:value-of select="$selected-content-style"/>
  540.       </xsl:attribute>
  541.  
  542.       <xsl:apply-templates select="media:content | mediabroken:content">
  543.         <xsl:with-param name="scale-factor" select="$scale-factor"/>
  544.       </xsl:apply-templates>
  545.     </ci:embedGroup>
  546.   </xsl:template>
  547.  
  548.  
  549.   <xsl:template match="gd:rating[@value or @average][@max]">
  550.     <xsl:param name="id-prefix"/>
  551.     <xsl:param name="height">16px</xsl:param>
  552.     <xsl:param name="baseline-height"/>
  553.     <xsl:param name="additional-styles"/>
  554.  
  555.     <xsl:variable name="rating-value">
  556.       <xsl:choose>
  557.         <xsl:when test="@value"><xsl:value-of select="@value"/></xsl:when>
  558.         <xsl:when test="@average"><xsl:value-of select="@average"/></xsl:when>
  559.       </xsl:choose>
  560.     </xsl:variable>
  561.     <xsl:variable name="value" select="ceiling(number($rating-value) * 10 div number(@max))"/>
  562.  
  563.     <xul:hbox id="{$id-prefix}-rating" align="middle">
  564.       <xsl:attribute name="style">
  565.         pack: -ci-no-padding;
  566.         height: <xsl:value-of select="$height"/>;
  567.         <xsl:if test="$baseline-height">-ci-baseline-height: <xsl:value-of select="$baseline-height"/>;</xsl:if>
  568.       </xsl:attribute>
  569.  
  570.       <xul:image id="{$id-prefix}-star-1" flex="1" style="-ci-image-resize: scale-both;">
  571.         <xsl:attribute name="src">
  572.           <xsl:choose>
  573.             <xsl:when test="$value >= 2"><xsl:value-of select="$full-star-image-uri"/></xsl:when>
  574.             <xsl:when test="$value >= 1"><xsl:value-of select="$half-star-image-uri"/></xsl:when>
  575.             <xsl:otherwise><xsl:value-of select="$empty-star-image-uri"/></xsl:otherwise>
  576.           </xsl:choose>
  577.         </xsl:attribute>
  578.       </xul:image>
  579.  
  580.       <xul:image id="{$id-prefix}-star-2" flex="1" style="-ci-image-resize: scale-both;">
  581.         <xsl:attribute name="src">
  582.           <xsl:choose>
  583.             <xsl:when test="$value >= 4"><xsl:value-of select="$full-star-image-uri"/></xsl:when>
  584.             <xsl:when test="$value >= 3"><xsl:value-of select="$half-star-image-uri"/></xsl:when>
  585.             <xsl:otherwise><xsl:value-of select="$empty-star-image-uri"/></xsl:otherwise>
  586.           </xsl:choose>
  587.         </xsl:attribute>
  588.       </xul:image>
  589.  
  590.       <xul:image id="{$id-prefix}-star-3" flex="1" style="-ci-image-resize: scale-both;">
  591.         <xsl:attribute name="src">
  592.           <xsl:choose>
  593.             <xsl:when test="$value >= 6"><xsl:value-of select="$full-star-image-uri"/></xsl:when>
  594.             <xsl:when test="$value >= 5"><xsl:value-of select="$half-star-image-uri"/></xsl:when>
  595.             <xsl:otherwise><xsl:value-of select="$empty-star-image-uri"/></xsl:otherwise>
  596.           </xsl:choose>
  597.         </xsl:attribute>
  598.       </xul:image>
  599.  
  600.       <xul:image id="{$id-prefix}-star-4" flex="1" style="-ci-image-resize: scale-both;">
  601.         <xsl:attribute name="src">
  602.           <xsl:choose>
  603.             <xsl:when test="$value >= 8"><xsl:value-of select="$full-star-image-uri"/></xsl:when>
  604.             <xsl:when test="$value >= 7"><xsl:value-of select="$half-star-image-uri"/></xsl:when>
  605.             <xsl:otherwise><xsl:value-of select="$empty-star-image-uri"/></xsl:otherwise>
  606.           </xsl:choose>
  607.         </xsl:attribute>
  608.       </xul:image>
  609.  
  610.       <xul:image id="{$id-prefix}-star-5" flex="1" style="-ci-image-resize: scale-both;">
  611.         <xsl:attribute name="src">
  612.           <xsl:choose>
  613.             <xsl:when test="$value >= 10"><xsl:value-of select="$full-star-image-uri"/></xsl:when>
  614.             <xsl:when test="$value >= 9"><xsl:value-of select="$half-star-image-uri"/></xsl:when>
  615.             <xsl:otherwise><xsl:value-of select="$empty-star-image-uri"/></xsl:otherwise>
  616.           </xsl:choose>
  617.         </xsl:attribute>
  618.       </xul:image>
  619.     </xul:hbox>
  620.   </xsl:template>
  621.  
  622.  
  623.   <xsl:template match="atom:source[atom:logo]">
  624.     <xsl:param name="id">site-logo</xsl:param>
  625.  
  626.     <xsl:variable name="id-marker">
  627.       <xsl:if test="$id = 'site-logo'"><xsl:value-of select="atom:link[@rel='pivot']/@href"/></xsl:if>
  628.     </xsl:variable>
  629.  
  630.     <xsl:choose>
  631.       <xsl:when test="atom:link[@rel='pivot']">
  632.         <ci:button id="{$id}-{$id-marker}" animate-mouse-out="true" style="max-height: 36px">
  633.           <xsl:attribute name="href"><xsl:value-of select="atom:link[@rel='pivot']/@href"/></xsl:attribute>
  634.  
  635.           <xsl:if test="atom:link[@rel='pivot']/@title">
  636.             <xsl:attribute name="alt">
  637.               <xsl:value-of select="atom:link[@rel='pivot']/@title"/>
  638.             </xsl:attribute>
  639.           </xsl:if>
  640.  
  641.           <xsl:attribute name="src">
  642.             <xsl:value-of select="atom:logo/text()"/>
  643.           </xsl:attribute>
  644.           <xsl:attribute name="hover-src">
  645.             <xsl:value-of select="atom:logo/text()"/>
  646.           </xsl:attribute>
  647.           <xsl:attribute name="pressed-src">
  648.             <xsl:value-of select="atom:logo/text()"/>
  649.           </xsl:attribute>
  650.           <xsl:attribute name="clicked-src">
  651.             <xsl:value-of select="atom:logo/text()"/>
  652.           </xsl:attribute>
  653.         </ci:button>
  654.       </xsl:when>
  655.  
  656.       <!-- Hi Mom! -->
  657.  
  658.       <xsl:otherwise>
  659.         <xul:image id="{$id}" height="24px" style="-ci-image-resize: scale-both">
  660.           <xsl:attribute name="src">
  661.             <xsl:value-of select="atom:logo/text()"/>
  662.           </xsl:attribute>
  663.         </xul:image>
  664.       </xsl:otherwise>
  665.     </xsl:choose>
  666.   </xsl:template>
  667.  
  668.  
  669.   <!-- Simpler icon template for an additional small non-link badge -->
  670.   <xsl:template match="atom:source[atom:icon]">
  671.     <xsl:param name="id">site-icon</xsl:param>
  672.     <xul:image id="{$id}" height="24px" style="-ci-image-resize: scale-both">
  673.       <xsl:attribute name="src">
  674.         <xsl:value-of select="atom:icon/text()"/>
  675.       </xsl:attribute>
  676.     </xul:image>
  677.   </xsl:template>
  678.  
  679.  
  680.   <!-- HTML CLEANUP TEMPLATES -->
  681.  
  682.   <xsl:template match="html:em" mode="sanitize">
  683.     <xsl:apply-templates select="* | text()"/>
  684.   </xsl:template>
  685.  
  686.   <xsl:template match="html:a" mode="sanitize">
  687.     <html:a>
  688.       <xsl:attribute name="href"><xsl:value-of select="@href"/></xsl:attribute>
  689.       <xsl:attribute name="style">
  690.         color: <xsl:choose><xsl:when test="starts-with(@href, 'jsfeed:')">#79f</xsl:when><xsl:otherwise>#78a</xsl:otherwise></xsl:choose> ;
  691.         -ci-color-hover: #9bf;
  692.         -ci-color-clicked: #f9f;
  693.         -ci-text-decoration-hover: underline;
  694.       </xsl:attribute>
  695.       <xsl:copy-of select="text()"/>
  696.     </html:a>
  697.   </xsl:template>
  698.  
  699.   <xsl:template match="html:small" mode="sanitize">
  700.     <html:span style="font-size: 4pt;">
  701.       <xsl:copy-of select="* | text()"/>
  702.     </html:span>
  703.   </xsl:template>
  704.  
  705.   <xsl:template match="html:div" mode="sanitize">
  706.     <html:span>
  707.       <xsl:copy-of select="* | text()"/>
  708.     </html:span>
  709.   </xsl:template>
  710.  
  711.  
  712.   <!-- TOP-LEVEL TEMPLATES -->
  713.  
  714.   <xsl:template name="standard-loading-window">
  715.     <xsl:param name="color-1" select="'#445'"/>
  716.     <xsl:param name="color-2" select="'#000'"/>
  717.  
  718.     <xul:window>
  719.       <xul:vbox id="top">
  720.         <xsl:attribute name="style">
  721.           -ci-window-frame-style: shadow;
  722.           align: center;
  723.           pack: center;
  724.           -ci-background-gradient-color-1: <xsl:value-of select="$color-1"/>;
  725.           -ci-background-gradient-color-2: <xsl:value-of select="$color-2"/>;
  726.         </xsl:attribute>
  727.       </xul:vbox>
  728.     </xul:window>
  729.   </xsl:template>
  730.  
  731.  
  732.   <xsl:template name="thumbnail-window-image-only">
  733.     <xul:window style="-ci-window-frame-style: shadow;">
  734.       <xsl:choose>
  735.         <xsl:when test="media:thumbnail or mediabroken:thumbnail">
  736.           <xsl:apply-templates select="media:thumbnail[position() = 1] | mediabroken:thumbnail[position() = 1]"/>
  737.         </xsl:when>
  738.         <xsl:when test="media:content or mediabroken:content">
  739.           <xsl:apply-templates select="media:content | mediabroken:content" mode="thumbnail"/>
  740.         </xsl:when>
  741.       </xsl:choose>
  742.     </xul:window>
  743.   </xsl:template>
  744.  
  745.  
  746.   <xsl:template name="thumbnail-window-with-overlay">
  747.     <xsl:param name="top-overlay"/>
  748.     <xsl:param name="bottom-overlay"/>
  749.     <xsl:param name="custom-badge"/>
  750.     <xsl:param name="use-custom-badge-fragment"/>
  751.     <xsl:param name="suppress-content-type-badge"/>
  752.  
  753.     <xul:window>
  754.       <xul:stack id="top">
  755.         <xsl:attribute name="style">
  756.           -ci-window-frame-style: shadow;
  757.           -ci-auto-size: content-box;
  758.           -ci-background-gradient-color-1: <xsl:value-of select="$highlight-background-color"/>;
  759.           -ci-background-gradient-color-2: <xsl:value-of select="$background-color"/>;
  760.           -ci-z-order: 1;
  761.           color: <xsl:value-of select="$foreground-color"/>;
  762.           <xsl:value-of select="$standard-font"/>
  763.           font-size: 10pt;
  764.           line-height: 120%;
  765.         </xsl:attribute>
  766.  
  767.         <xsl:call-template name="thumbnail-content-box">
  768.           <xsl:with-param name="custom-badge"><xsl:copy-of select="$custom-badge"/></xsl:with-param>
  769.           <xsl:with-param name="use-custom-badge-fragment"><xsl:copy-of select="$use-custom-badge-fragment"/></xsl:with-param>
  770.           <xsl:with-param name="suppress-content-type-badge" select="$suppress-content-type-badge"/>
  771.         </xsl:call-template>
  772.  
  773.         <xul:vbox>
  774.           <xsl:copy-of select="$top-overlay"/>
  775.           <xul:box flex="1"/>
  776.           <xsl:copy-of select="$bottom-overlay"/>
  777.         </xul:vbox>
  778.       </xul:stack>
  779.     </xul:window>
  780.   </xsl:template>
  781.  
  782.  
  783.   <xsl:template name="thumbnail-window-with-bottom-panel">
  784.     <xsl:param name="body"/>
  785.     <xsl:param name="custom-badge"/>
  786.     <xsl:param name="use-custom-badge-fragment"/>
  787.     <xsl:param name="suppress-content-type-badge"/>
  788.  
  789.     <xul:window>
  790.       <xul:vbox id="top">
  791.         <xsl:attribute name="style">
  792.           -ci-window-frame-style: shadow;
  793.           align: middle;
  794.           pack: -ci-no-padding;
  795.           -ci-auto-size: content-box;
  796.           -ci-background-gradient-color-1: <xsl:value-of select="$highlight-background-color"/>;
  797.           -ci-background-gradient-color-2: <xsl:value-of select="$background-color"/>;
  798.           color: <xsl:value-of select="$foreground-color"/>;
  799.           <xsl:value-of select="$standard-font"/>
  800.           font-size: 10pt;
  801.           line-height: 120%;
  802.         </xsl:attribute>
  803.  
  804.         <xsl:call-template name="thumbnail-content-box">
  805.           <xsl:with-param name="custom-badge"><xsl:copy-of select="$custom-badge"/></xsl:with-param>
  806.           <xsl:with-param name="use-custom-badge-fragment"><xsl:copy-of select="$use-custom-badge-fragment"/></xsl:with-param>
  807.           <xsl:with-param name="suppress-content-type-badge" select="$suppress-content-type-badge"/>
  808.         </xsl:call-template>
  809.  
  810.         <xsl:copy-of select="$body"/>
  811.       </xul:vbox>
  812.     </xul:window>
  813.   </xsl:template>
  814.  
  815.   <xsl:template name="selected-window-vertical">
  816.     <xsl:param name="content-panel-override"/>
  817.     <xsl:param name="header"/>
  818.     <xsl:param name="body"/>
  819.     <xsl:param name="footer"/>
  820.     <xsl:param name="enable-interactive-mode" select="false"/>
  821.     <xsl:param name="video-playback-control" select="false"/>
  822.     <xsl:param name="scale-factor" select="1.0"/>
  823.  
  824.     <xul:window>
  825.       <xul:vbox id="top">
  826.         <xsl:attribute name="style">
  827.           pack: -ci-no-padding;
  828.           align: center;
  829.           -ci-auto-size: content!placeholder;
  830.           background-color: <xsl:value-of select="$background-color"/>;
  831.           padding: <xsl:value-of select="$medium-separator"/>;
  832.           -ci-window-frame-style: shadow;
  833.           pack: -ci-no-padding;
  834.           align: middle;
  835.           color: <xsl:value-of select="$foreground-color"/>;
  836.           border-width: 1px;
  837.           border-color: <xsl:value-of select="$dark-foreground-color"/>;
  838.           <xsl:value-of select="$standard-font"/>
  839.           font-size: 11pt;
  840.           line-height: 120%;
  841.           <xsl:if test="$enable-interactive-mode = 'true'">
  842.             -ci-enable-interactive-mode: true;
  843.           </xsl:if>
  844.         </xsl:attribute>
  845.  
  846.         <xsl:choose>
  847.           <xsl:when test="$content-panel-override">
  848.             <xsl:copy-of select="$content-panel-override"/>
  849.           </xsl:when>
  850.           <xsl:when test="media:group | mediabroken:group">
  851.             <xsl:apply-templates select="media:group | mediabroken:group"/>
  852.           </xsl:when>
  853.           <xsl:otherwise>
  854.             <xsl:apply-templates select="media:content | mediabroken:content">
  855.               <xsl:with-param name="id">content!placeholder</xsl:with-param>
  856.               <xsl:with-param name="scale-factor" select="$scale-factor"/>
  857.             </xsl:apply-templates>
  858.           </xsl:otherwise>
  859.         </xsl:choose>
  860.  
  861.         <xsl:if test="$video-playback-control = 'true'">
  862.           <ci:videoPlaybackControl id="video-playback-control" idref="content!placeholder"/>
  863.         </xsl:if>
  864.  
  865.         <xul:vbox id="metadata-panel">
  866.           <xul:box height="{$medium-separator}"/>
  867.           <xsl:copy-of select="$header"/>
  868.           <xsl:copy-of select="$body"/>
  869.           <xsl:copy-of select="$footer"/>
  870.         </xul:vbox>
  871.       </xul:vbox>
  872.     </xul:window>
  873.   </xsl:template>
  874.  
  875.  
  876.   <xsl:template name="full-screen-window">
  877.     <xsl:param name="content-panel-override"/>
  878.     <xsl:param name="header"/>
  879.     <xsl:param name="body"/>
  880.     <xsl:param name="footer"/>
  881.     <xsl:param name="enable-interactive-mode" select="false"/>
  882.     <xsl:param name="video-playback-control" select="false"/>
  883.     <xsl:param name="exclude-toolbar-areas" select="false"/>
  884.     <xsl:param name="fill-screen-override" select="false"/>
  885.     <xsl:param name="text-flow"/>
  886.     <xsl:param name="scale-factor" select="1.0"/>
  887.  
  888.     <xsl:variable name="content">
  889.       <xsl:choose>
  890.         <xsl:when test="$content-panel-override">
  891.           <xsl:copy-of select="$content-panel-override"/>
  892.         </xsl:when>
  893.  
  894.         <xsl:when test="media:group | mediabroken:group">
  895.           <xsl:apply-templates select="media:group | mediabroken:group">
  896.             <xsl:with-param name="selected-content-style">
  897.               min-width: 10em;
  898.               min-height: 10em;
  899.               -ci-image-resize: scale-both;
  900.               -ci-load-mode: sync;
  901.               -ci-z-order: 1;
  902.             </xsl:with-param>
  903.           </xsl:apply-templates>
  904.         </xsl:when>
  905.  
  906.         <xsl:otherwise>
  907.           <xsl:apply-templates select="media:content | mediabroken:content">
  908.             <xsl:with-param name="id">content!placeholder</xsl:with-param>
  909.             <xsl:with-param name="selected-content-style">
  910.               min-width: 10em;
  911.               min-height: 10em;
  912.               -ci-image-resize: scale-both;
  913.               -ci-load-mode: sync;
  914.               -ci-z-order: 1;
  915.             </xsl:with-param>
  916.             <xsl:with-param name="scale-factor" select="$scale-factor"/>
  917.           </xsl:apply-templates>
  918.         </xsl:otherwise>
  919.       </xsl:choose>
  920.     </xsl:variable>
  921.  
  922.     <xsl:variable name="metadata-layer">
  923.       <xul:vbox id="metadata-frame" flex="1">
  924.         <xsl:if test="$video-playback-control = 'true'">
  925.           <ci:videoPlaybackControl id="video-playback-control" idref="content!placeholder"/>
  926.           <xul:box height="{$large-separator}"/>
  927.         </xsl:if>
  928.  
  929.         <xsl:copy-of select="$header"/>
  930.         <xsl:copy-of select="$body"/>
  931.         <xsl:copy-of select="$footer"/>
  932.       </xul:vbox>
  933.     </xsl:variable>
  934.  
  935.     <xul:window>
  936.       <xul:stack id="top">
  937.         <xsl:attribute name="style">
  938.           -ci-window-frame-style: none;
  939.           background-color: <xsl:value-of select="$saturated-background-color"/>;
  940.           <xsl:choose>
  941.             <xsl:when test="$ci:sys.toolbars-visible = 'true'">
  942.               -ci-background-gradient-color-1: #445;
  943.               -ci-background-gradient-color-2: #000;
  944.               -ci-background-gradient-angle: 10;
  945.             </xsl:when>
  946.             <xsl:otherwise>
  947.               -ci-background-gradient-color-1: #11111a;
  948.               -ci-background-gradient-color-2: #000;
  949.               -ci-background-gradient-angle: 9.4;
  950.             </xsl:otherwise>
  951.           </xsl:choose>
  952.           color: <xsl:value-of select="$foreground-color"/>;
  953.           <xsl:value-of select="$standard-font"/>
  954.           font-size: 14pt;
  955.           line-height: 120%;
  956.           <xsl:if test="$enable-interactive-mode = 'true'">
  957.             -ci-enable-interactive-mode: true;
  958.           </xsl:if>
  959.         </xsl:attribute>
  960.  
  961.         <xsl:choose>
  962.           <xsl:when test="$ci:sys.toolbars-visible = 'true' or
  963.                           ($enable-interactive-mode = 'true' and $exclude-toolbar-areas = 'true' and not($fill-screen-override = 'true'))">
  964.             <xul:vbox id="content-layer" align="center" pack="middle">
  965.               <xsl:if test="$exclude-toolbar-areas = 'true'">
  966.                 <xul:box id="upper-toolbar-overlay">
  967.                   <xsl:attribute name="style">
  968.                     height: <xsl:value-of select="$ci:sys.upper-toolbar-height"/>px;
  969.                   </xsl:attribute>
  970.                 </xul:box>
  971.               </xsl:if>
  972.  
  973.               <xsl:choose>
  974.                 <xsl:when test="$exclude-toolbar-areas = 'true'">
  975.                   <xul:vbox flex="1" align="center">
  976.                     <xsl:copy-of select="$content"/>
  977.  
  978.                     <xul:box height="{$large-separator}"/>
  979.                     <xul:hbox id="metadata-section">
  980.                       <xsl:attribute name="style">
  981.                         background-color: <xsl:value-of select="$background-color"/>;
  982.                         padding: <xsl:value-of select="$large-separator"/>;
  983.                       </xsl:attribute>
  984.  
  985.                       <xul:box flex="1"/>
  986.                       <xul:hbox flex="4" pack="middle">
  987.                         <xsl:copy-of select="$metadata-layer"/>
  988.                       </xul:hbox>
  989.                       <xul:box flex="1"/>
  990.                     </xul:hbox>
  991.                     <xul:box height="{$large-separator}"/>
  992.                   </xul:vbox>
  993.                 </xsl:when>
  994.  
  995.                 <xsl:otherwise>
  996.                   <xsl:copy-of select="$content"/>
  997.                 </xsl:otherwise>
  998.               </xsl:choose>
  999.  
  1000.               <xsl:if test="$exclude-toolbar-areas = 'true'">
  1001.                 <xul:box id="lower-toolbar-overlay">
  1002.                   <xsl:attribute name="style">
  1003.                     height: <xsl:value-of select="$ci:sys.fullscreen-lower-toolbar-height"/>px;
  1004.                   </xsl:attribute>
  1005.                 </xul:box>
  1006.               </xsl:if>
  1007.             </xul:vbox>
  1008.  
  1009.             <xsl:if test="not($exclude-toolbar-areas = 'true')">
  1010.               <xul:vbox id="metadata-layer" align="end">
  1011.                 <xul:hbox flex="1" align="end" pack="end">
  1012.                   <xul:box flex="1"/>
  1013.                   <xul:hbox id="metadata-section" flex="4">
  1014.                     <xsl:attribute name="style">
  1015.                       -ci-z-order: 2;
  1016.                       background-color: <xsl:value-of select="$background-color"/>;
  1017.                       opacity: 0.85;
  1018.                       padding: <xsl:value-of select="$large-separator"/>;
  1019.                     </xsl:attribute>
  1020.                     <xsl:copy-of select="$metadata-layer"/>
  1021.                   </xul:hbox>
  1022.                   <xul:box flex="1"/>
  1023.                   <xul:box width="{$large-separator}"/>
  1024.                 </xul:hbox>
  1025.  
  1026.                 <xul:box height="{$large-separator}"/>
  1027.                 <xul:box id="lower-toolbar-overlay-2">
  1028.                   <xsl:attribute name="style">
  1029.                     height: <xsl:value-of select="$ci:sys.fullscreen-lower-toolbar-height"/>px;
  1030.                   </xsl:attribute>
  1031.                 </xul:box>
  1032.               </xul:vbox>
  1033.             </xsl:if>
  1034.           </xsl:when>
  1035.  
  1036.           <xsl:otherwise>
  1037.             <xul:hbox pack="middle" align="middle">
  1038.               <xsl:copy-of select="$content"/>
  1039.             </xul:hbox>
  1040.           </xsl:otherwise>
  1041.         </xsl:choose>
  1042.  
  1043.       </xul:stack>
  1044.  
  1045.       <xsl:copy-of select="$text-flow"/>
  1046.     </xul:window>
  1047.   </xsl:template>
  1048.  
  1049. </xsl:transform>
  1050.